<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>客户登录系统-新增用户</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css" />
</head>
<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="../js/base64.js"></script>
<script type="text/javascript" src="../js/crypto-js-4.0.0/crypto-js.js" ></script>
<script type="text/javascript" src="../js/crypto-js-4.0.0/aes.js" ></script>
<script type="text/javascript" src="../vue/vue.js"></script>
<script type="text/javascript" src="../vue/axios.js"></script>
<body>
    <div class="login-box" id="login-box">
        <div class="login-title">客户录入信息系统登录-新增用户</div>
        <table>
            <table>
                <tr>
                    <td>姓名:</td>
                    <td>
                        <input id="name" type="text" v-model="name"/>
                    </td>
                    <td id="checkName"></td>
                </tr>
                <tr>
                    <td>身份证号:</td>
                    <td>
                        <input id="idCard" type="text" v-model="idCard"/>
                    </td>
                    <td id="checkIdCard"></td>
                </tr>
                <tr>
                    <td>手机号:</td>
                    <td>
                        <input id="tel" type="text" v-model="tel" />
                    </td>
                    <td id="checkTel"></td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <button id="submit" v-on:click="submit">录入信息</button>
                    </td>
                </tr>
            </table>
        </table>
    </div>
</body>
<script>
   var app=new Vue({
       el:"#login-box",
       data:{
           name:"",
           idCard:"",
           tel:""

       },
       method:{
           submit:function () {
               axios.post("/user/insertUsers",{
                   name:this.name,
                   idCard:this.idCard,
                   telNum:this.tel

               }).then(
                   function (value) {

                      if(value.data.msg=="001"){
                        alert(value.data.data);
                        location.href="/transform.html";
                      }else{
                          alert(value.data.data)
                      }
                   },alert("系统傻了")

               )


           }
       }





   })

</script>
</html>
